<!--
  This file is a part of the open-eBackup project.
  This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
  If a copy of the MPL was not distributed with this file, You can obtain one at
  http://mozilla.org/MPL/2.0/.
  
  Copyright (c) [2024] Huawei Technologies Co.,Ltd.
  
  THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
  EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
  MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
  -->

<lv-select [lvOptions]='vCenterOptions' [(ngModel)]="selectedVCenter" (ngModelChange)='vCenterChange($event)'
    lvValueKey="key" lvShowFilter lvFilterMode="contains" lvFilterKey='label'>
</lv-select>
<div [ngClass]="{'tree-container':treeData.length,'no-data':!treeData.length}">
    <lv-search *ngIf="treeData.length" [(ngModel)]="searchValue"
        (ngModelChange)='resTree.filter({ filterMode: "contains", key: "label", value: $event})'></lv-search>
    <lv-tree [lvData]="treeData" lvShowLine lvSelectionMode="single" [(lvSelection)]="treeSelection" #resTree
        (lvExpandedChange)="expandedChange($event)" (lvCheck)="nodeCheck($event)" [lvHighlightContent]="searchValue"
        lvShowContentIcon lvVirtualScroll lvSelectionAssociate="false">
    </lv-tree>
</div>
<div *ngIf="showErrorTip" lv-overflow style="width:711px">
    <i lv-icon='lv-icon-status-failed' class="icon-failed"></i>
    <span class="error-tip"> {{errorTipLabel}}</span>
</div>